package com.app.utils;

import java.util.HashMap;

import android.content.Context;
import android.text.TextUtils;

import com.core.lib.utils.main.AppManager;
import com.core.lib.utils.main.LogUtilBase;
import com.core.lib.utils.main.UtilityBase;
import com.eyzhs.app.BuildConfig;

/*
 * 放网络请求的url地址，每个接口需要加上注释
 */
public class Setting {

	/**
	 * IConstants 这个类也有需要配置的
	 */
	//上线时，这几个变量需值为false
	public static final boolean DEBUG = true;// false
	public static final boolean NeedCrashLog = false;//true
	public static final boolean NeedCustomLog = true;//false
	public static final boolean UmengDebug = true;//false

	// ===================================================================================
	private final static String HTTP = "http://";
	private final static String HTTPS = "https://";
	private final static String SPLIT = "/";

	// ==========================================================================================================
	/*
	 * app接口环境
	 */
	// url
	private static final String HOST_DEV = "192.168.21.101:8012";// 开发环境
	private static final String HOST_ONLINE_TEST = "api.test.eyzhs.com";// 外边可以访问的环境
	private static final String HOST_ONLINE = "api.eyzhs.com";// 发布环境
	private static final String HOST_TEST = "api.t.eyzhs.com";// 测试环境
	private static final String HOST_ONLINE_R = "api.r.eyzhs.com";// 预发布环境

	private static final String HOST_DETAIL_TEST = "http://www.t.eyzhs.com";
	private static final String HOST_DETAIL_ONLINE = "http://www.eyzhs.com";
	private static final String HOST_DETAIL_ONLINE_R = "http://www.r.eyzhs.com";

	// image
	private static final String HOST_DEV_IMG = "192.168.21.101:8012.eyzhs.com";
	private static final String HOST_TEST_IMG = "img.t.eyzhs.com";
	private static final String HOST_ONLINE_TEST_IMG = "img.test.eyzhs.com";
	private static final String HOST_ONLINE_IMG = "img.eyzhs.com";

	// can modify====================================================================
	private final static String HOST = DEBUG ? HOST_TEST :
			HOST_ONLINE;// 配置上线是什么环境！！！！！！！！！！！！！！！！！！！！！！！！
	public final static String HOST_DETAIL = DEBUG ? HOST_DETAIL_TEST
			: HOST_DETAIL_ONLINE;
	private final static String HOST_IMG = DEBUG ? HOST_TEST_IMG
			: HOST_ONLINE_IMG;
	//================================================================================
	public static final String CHAT_SERVICE_HOST = DEBUG ? "192.168.21.157"
			: "im.eyzhs.com";
	public static final int CHAT_SERVICE_PORT = 5222;

	public final static String URL_API_HOST_HTTP = HTTPS + HOST + SPLIT;//https
	public final static String URL_API_HOST_DETAIL_HTTP = HOST_DETAIL + SPLIT;
	public final static String URL_API_HOST_HTTP_IMG = HTTP + HOST_IMG + SPLIT;

	// ==========================================================================================
	// share
	public static String SHARE_BASE_DETAIL_URL = DEBUG ? (HOST_DETAIL + "/appShare/%s?detailID=%s&UserId=%s&LoginToken=%s")
			: (HOST_DETAIL + "/appShare/%s?detailID=%s&UserId=%s&LoginToken=%s");
	// ========================================
	public static final int DEVICEID = 2;// android
	public static final int APPLICATIONID = 8;
	public static final int PAGE_SIZE = 25;
	private static String updateImageURL;
	private static String questionListUrl;
	private static String questionStatus;

	public static int getBranchID(Context context){
		int branchID = 1;//default 1

		int majiaType = Utils.getMaJiaType(context);
		if(majiaType > 0)
		{
			branchID = majiaType;
		}

		return branchID;
	}

	public static String getUploadLogUrl() {
		return "";
	}

	public static String getAppOfficialUrl() {
		return "http://m.eyzhs.com/";
	}

	public static String getShareTopicUrl() {
		return URL_API_HOST_DETAIL_HTTP + "appShare/forum/topic.jsp?";
	}

	public static String getAppShareArticleUrl(String detailId)
	{
		//old
		return String.format(SHARE_BASE_DETAIL_URL, "article.jsp", detailId,
				LoginUtil.getUserId(), "");
	}

	/*
	 * 分享文章详情
	 */
	public static String getShareArticleUrl(String detailId) {

		StringBuffer sb = new StringBuffer();
		sb.append(URL_API_HOST_DETAIL_HTTP);
		sb.append("shareArticleDetail");

		HashMap<String, String> maps = new HashMap<String, String>();
		maps.put("ArticleID", detailId);
		maps.put("UserID", LoginUtil.getUserId());
		
		String url = UtilityBase.connectParamsUrl(sb.toString(), maps);
		LogUtilBase.LogD(null, String.format("shareArticleDetail url==>>%s", url));
		return url;
	}

	/*
	 * 分享抽奖
	 */
	public static String getShareRaffleUrl(String detailId, String userId,
			String loginToken) {
		return String.format(SHARE_BASE_DETAIL_URL, "raffle.jsp", detailId,
				userId, loginToken);
	}

	/*
	 * 分享抽奖
	 */
	public static String getShareSuccessUrl() {
		return URL_API_HOST_HTTP + "share/notifyShare";
	}

	public static String getTestUrl(int test) {
		return "http://www.baidu.com";
	}

	// ==================================================================

	/*
	 * 获取图片接口
	 */
	public static String getImageUrl(String imageUrl) {
		String url = "";
		if (!TextUtils.isEmpty(imageUrl)) {
			if (imageUrl.startsWith("http://")) {
				url = imageUrl;
			} else {
				url = URL_API_HOST_HTTP_IMG + imageUrl;
			}
		}
		return url;
	}

	/*
	 * 获取app start
	 */
	public static String getAppStartUp() {
		return URL_API_HOST_HTTP + "system/startup3";
	}

	/*
	 * 获取检查更新接口
	 */
	public static String getCheckUpdate() {
		return URL_API_HOST_HTTP + "system/checkUpdate2";
	}

	/*
	 * 获取RegisterUrl
	 */
	public static String getRegisterUrl() {
		return URL_API_HOST_HTTP + "user/register";
	}

	/*
	 * 获取bondUrl
	 */
	public static String getBondUrl() {
		return URL_API_HOST_HTTP + "user/bindMobilePhone";
	}

	/*
	 * 第三方用户登录
	 */
	public static String getThirdpartyLogin() {
		return URL_API_HOST_HTTP + "user/thirdpartyLogin";
	}

	/*
	 * 第三方用户登录bond
	 */
	public static String getThirdpartyBind() {
		return URL_API_HOST_HTTP + "user/thirdpartyBind";
	}

	/*
	 * 获取RegisterCodeUrl 获取验证码
	 */
	public static String getRegisterCodeUrl() {
		return URL_API_HOST_HTTP + "user/sendRegisterCAPTCHA";
	}

	/*
	 * 获取ResetPasswordCodeUrl 获取重置密码验证码
	 */
	public static String getResetPasswordCodeUrl() {
		return URL_API_HOST_HTTP + "user/sendResetPasswordCAPTCHA";
	}

	/*
	 * 获取ResetPasswordCodeUrl 获取 用户通过验证短信重置密码
	 */
	public static String getResetPasswordByCodeUrl() {
		return URL_API_HOST_HTTP + "user/resetPasswordByCAPTCHA";
	}

	/*
	 * 获取PwdQuestionUrl 获取密保问题
	 */
	public static String getPwdQuestionUrl() {
		return URL_API_HOST_HTTP + "user/getSecurityQuestionList";
	}

	/*
	 * 获取PwdQuestionByPhoneUrl 获取用户绑定密保问题列表
	 */
	public static String getPwdQuestionByPhoneUrl() {
		return URL_API_HOST_HTTP + "user/getUserSecurityQuestionList";
	}

	/*
	 * 获取ByPwdQuestionUrl 获取 通过密保问题修改密码
	 */
	public static String getResetPwdByPwdQuestionUrl() {
		return URL_API_HOST_HTTP + "user/resetPasswordBySecurityQuestion";
	}

	/*
	 * 获取UpdateSecurityQuestionUrl 获取 更新密保问题
	 */
	public static String getUpdateSecurityQuestionUrl() {
		return URL_API_HOST_HTTP + "user/updateSecurityQuestion";
	}

	/*
	 * 获取ModifyPwdUrl 获取 修改密码接口
	 */
	public static String getModifyPwdUrl() {
		return URL_API_HOST_HTTP + "user/editUserPassword";
	}

	/*
	 * 获取FeedbackUrl 获取 意见反馈接口
	 */
	public static String getFeedbackUrl() {
		return URL_API_HOST_HTTP + "other/advice";
	}

	/*
	 * 获取服务条款 test
	 */
	public static String getUserProtocolUrl() {
		return "http://dl.eyzhs.com/yzhs/disclaimer.html";
	}

	/*
	 * 获取隐私政策 test
	 */
	public static String getUserSecretUrl() {
		return "http://dl.eyzhs.com/yzhs/privacy/privacy.html";
	}

	// ==================================================================

	/*
	 * 获取LoginUrl
	 */
	public static String getLoginUrl() {
		return URL_API_HOST_HTTP + "user/login";
	}

	/*
	 * 获取 完善用户信息接口
	 */
	public static String getModifyUserInfoUrl() {
		return URL_API_HOST_HTTP + "user/postProfile";
	}

	/*
	 * 获取 完善用户信息接口
	 */
	public static String getUpdateNickNameUrl() {
		return URL_API_HOST_HTTP + "user/updateUserNickName";
	}

	/*
	 * 获取 获取用户信息接口 已被废弃
	 */
	public static String getUserInfoUrl() {
		return URL_API_HOST_HTTP + "user/getProfile";
	}

	/*
	 * 获取 修改用户头像接口
	 */
	public static String getUserHeadIconUrl() {
		return URL_API_HOST_HTTP + "user/updateAvatar";
	}

	// ===============================album================================
	/*
	 * 上传图片 文字 接口
	 */
	public static String getAddPhotoUrl() {
		return URL_API_HOST_HTTP + "album/addPhoto";
	}

	/*
	 * 修改图片 文字 接口
	 */
	public static String getModifyPhotoUrl() {
		return URL_API_HOST_HTTP + "album/editPhoto";
	}

	/*
	 * 获取 申请热门相册
	 */
	public static String getShareAlbumUrl() {
		return URL_API_HOST_HTTP + "album/shareAlbum2";
	}

	/*
	 * 获取热门相册列表
	 */
	public static String getHotPhotoListUrl() {
		return URL_API_HOST_HTTP + "album/getShareAlbumList";
	}

	/*
	 * 获取热门相册 评论列表
	 */
	public static String getCommentsHotPhotoUrl() {
		return URL_API_HOST_HTTP + "album/getReplyList";
	}

	/*
	 * 获取热门相册 详情
	 */
	public static String getHotPhotoDetailUrl() {
		return URL_API_HOST_HTTP + "album/getAlbumDetail";
	}

	/*
	 * 获取发表热门相册评论
	 */
	public static String getPubCommentHotPhotoUrl() {
		return URL_API_HOST_HTTP + "album/userReply";
	}

	/*
	 * 获取赞热门相册
	 */
	public static String getLikeHotPhotoUrl() {
		return URL_API_HOST_HTTP + "album/favourAlbum";
	}

	/*
	 * 获取取消赞热门相册
	 */
	public static String getCancelLikeHotPhotoUrl() {
		return URL_API_HOST_HTTP + "album/cancelFavourAlbum";
	}

	/*
	 * 获取修改相册名称
	 */
	public static String getModiyAlbumNameUrl() {
		return URL_API_HOST_HTTP + "album/editAlbumName";
	}

	/*
	 * 获取修改相册音乐
	 */
	public static String getModiyAlbumMusicUrl() {
		return URL_API_HOST_HTTP + "album/selectAlbumMusic";
	}

	/*
	 * 获取修改相册封面
	 */
	public static String getModiyAlbumCoverUrl() {
		return URL_API_HOST_HTTP + "album/editAlbumCover";
	}

	// -=======================mother=================
	/*
	 * 获取文章列表
	 */
	public static String getArticleListUrl() {
		return URL_API_HOST_HTTP + "article/getArticleList";
	}

	/*
	 * 获取文章列表详情
	 */
	public static String getArticleDetailUrl() {
		return URL_API_HOST_HTTP + "article/getArticleDetail2";
	}

	/*
	 * 获取帖子列表
	 */
	public static String getPostListUrl() {
		return URL_API_HOST_HTTP + "bbs/getHotTopicList";
	}

	/*
	 * 搜索帖子列表
	 */
	public static String getSearchListUrl() {
		return URL_API_HOST_HTTP + "bbs/searchTopicList";
	}

	/*
	 * 获取主题列表
	 */
	public static String getTopicListUrl() {
		return URL_API_HOST_HTTP + "bbs/getTopicList2";
	}

	/*
	 * 获取圈子精华
	 */
	public static String getTopicGoodListUrl() {
		return URL_API_HOST_HTTP + "bbs/getGoodTopicList";
	}

	/*
	 * 获取用户主题列表
	 */
	public static String getMyTopicListUrl() {
		return URL_API_HOST_HTTP + "bbs/getTopicListByUser";
	}

	/*
	 * 获取我的热门相册列表
	 */
	public static String getMyShareAlbumListUrl() {
		return URL_API_HOST_HTTP + "album/getAlbumListByUser";
	}

	/*
	 * 获取我的主题详情
	 */
	public static String getMyTopicDetailUrl() {
		return URL_API_HOST_HTTP + "bbs/getTopic2";
	}

	/*
	 * 获取 赞
	 */
	public static String getFavourTopicUrl() {
		return URL_API_HOST_HTTP + "bbs/favourTopic";
	}

	/*
	 * 获取 取消 赞
	 */
	public static String getCancelFavourTopicUrl() {
		return URL_API_HOST_HTTP + "bbs/cancelFavourTopic";
	}

	/*
	 * 获取 评论列表
	 */
	public static String getReplyListUrl() {
		return URL_API_HOST_HTTP + "bbs/getReplyList2";
	}

	/*
	 * 获取 发表评论
	 */
	public static String getSubmitReplyUrl() {
		return URL_API_HOST_HTTP + "bbs/submitReply";
	}

	/*
	 * 获取 发表主题内容
	 */
	public static String getSubmitTopicUrl() {
		return URL_API_HOST_HTTP + "bbs/submitTopic";
	}

	/*
	 * 获取 发表主题资源
	 */
	public static String getUploadMediaUrl() {
		return URL_API_HOST_HTTP + "bbs/uploadMedia";
	}

	/*
	 * 获取圈子列表
	 */
	public static String getCircleListUrl() {
		return URL_API_HOST_HTTP + "bbs/getBBSCategoryList2";
	}

	/*
	 * 加入圈子
	 */
	public static String getCircleAddUrl() {
		return URL_API_HOST_HTTP + "bbs/userJoinBBSCategory";
	}

	/*
	 * 退出圈子
	 */
	public static String getCircleExitUrl() {
		return URL_API_HOST_HTTP + "bbs/userQuitBBSCategory";
	}

	/*
	 * 获取 首页
	 */
	public static String getIndexUrl() {
		return URL_API_HOST_HTTP + "tabData/getHomeData2";
	}

	/*
	 * 获取 首页 加载更多
	 */
	public static String getIndexMoreUrl() {
		return URL_API_HOST_HTTP + "tabData/getHomeHotTopicList2";
	}

	/*
	 * 获取 母婴医院数据
	 */
	public static String getHospitalUrl() {
		return URL_API_HOST_HTTP + "tabData/getYZHSTab3";
	}

	public static String getNewInnerMessageList() {
		return URL_API_HOST_HTTP + "push/getNewInnerMessageList";
	}

	/*
	 * 获取妈妈圈 最新数据
	 */
	public static String getMotherNewMessageListUrl() {
		return URL_API_HOST_HTTP + "bbs/getNewMessageList2";
	}

	/*
	 * 获取成长喜悦 最新数据
	 */
	public static String getGrowNewMessageListUrl() {
		return URL_API_HOST_HTTP + "album/getNewMessageList2";
	}

	/****************************************/

	/*
	 * 获取我的聊天列表
	 */
	public static String getAutoResponseUrl() {
		return URL_API_HOST_HTTP + "autoResponse/getAutoResponse";
	}

	/**
	 * 获取问题列表 聊天
	 * 
	 * @return
	 */
	public static String getQuestionListUrl() {
		return URL_API_HOST_HTTP + "consult/getConsultQuestionList";
	}

	/**
	 * 在线咨询 提交问题
	 * 
	 * @return
	 */
	public static String updateQuestionUrl() {
		return URL_API_HOST_HTTP + "consult/submitConsultQuestion2";
	}
	
	public static String downQuestionUrl() {
		return URL_API_HOST_HTTP + "consult/getNewReplyList";
	}

	/**
	 * 获取用户在线咨询状态
	 * 
	 * @return
	 */
	public static String getQuestionStatuUrl() {
		return URL_API_HOST_HTTP + "consult/getQuestionStatus2";
	}

	/**
	 * 删除用户问题
	 * 
	 * @return
	 */
	public static String getDeleteQuestionUrl() {
		return URL_API_HOST_HTTP + "consult/deleteQuestion";
	}

	/*
	 * 获取我的常见问题
	 */
	public static String getAllQuestionsUrl() {
		return URL_API_HOST_HTTP + "autoResponse/getQuestionAnswerResponse";
	}

	/*
	 * 获取 搜索我的文章
	 */
	public static String getSearchArticlesUrl() {
		return URL_API_HOST_HTTP + "article/searchArticle";
	}

	/*
	 * 获取 删除主题资源
	 */
	public static String getDeleteTopicUrl() {
		return URL_API_HOST_HTTP + "bbs/deleteTopic";
	}

	// ===================================
	/*
	 * 获取 删除主题资源
	 */
	public static String getDeleteHotPhotoUrl() {
		return URL_API_HOST_HTTP + "album/deleteShareAlbum";
	}

	/*
	 * 获取当月是否有数据
	 */
	public static String getGrowMonthDateUrl() {
		return URL_API_HOST_HTTP + "album/getDataMonth";
	}

	/*
	 * 获取同步所有数据接口
	 */
	public static String getGrowSyncByTimeUrl() {
		return URL_API_HOST_HTTP + "album/syncByTime";
	}

	/*
	 * 获云端同步到app接口 download
	 */
	public static String getSyncToAppUrl() {
		return URL_API_HOST_HTTP + "album/syncToApp";
	}

	/*
	 * 获取app同步到云端接口 upload
	 */
	public static String getSyncToCloudUrl() {
		return URL_API_HOST_HTTP + "album/syncToCloud";
	}

	/*
	 * 获取 抽奖活动详情
	 */
	public static String getLotteryDetailUrl() {
		return URL_API_HOST_HTTP + "raffle/getRaffleDetail";
	}

	/*
	 * 获取 立即抽奖
	 */
	public static String getLotteryUrl() {
		return URL_API_HOST_HTTP + "raffle/userRaffle";
	}

	/************************************************************************************/

	public static String getUpdateImageURL() {
		return URL_API_HOST_HTTP + "upload/uploadFile";
	}

	public static String getXmppImageUrl(String s) {
		return "";
	}

	/*
	 * 获取 我的地址
	 */
	public static String getMyAddressUrl() {

		return URL_API_HOST_HTTP + "user/getUserAddressList";
	}

	public static String getSaveUserAddressUrl() {
		return URL_API_HOST_HTTP + "user/saveUserAddress";
	}

	public static String getUpdateUserAddressUrl() {
		return URL_API_HOST_HTTP + "user/updateUserAddress";
	}

	public static String getDeleteUserAddressUrl() {
		return URL_API_HOST_HTTP + "user/deleteUserAddress";
	}

	/*
	 * 获取 我的总积分
	 */
	public static String getMyUserScoreUrl() {

		return URL_API_HOST_HTTP + "user/getProfile";
	}

	/*
	 * 获取 签到
	 */
	public static String getMySignInUrl() {

		return URL_API_HOST_HTTP + "user/SignIn";
	}

	public static String useReportUrl() {
		return URL_API_HOST_HTTP + "report/report";
	}

	public static String getCheckNickNameIsAvailable() {
		return URL_API_HOST_HTTP + "user/checkNickNameIsAvailable";
	}

	public static String getTirdpartyAccountList() {
		return URL_API_HOST_HTTP + "user/getTirdpartyAccountList";
	}

	public static String getBindTirdpartyAccount() {
		return URL_API_HOST_HTTP + "user/bindTirdpartyAccount";
	}

	public static String getHospitalNotifyUrl() {
		return "http://dl.eyzhs.com/consult/consultBubble2.txt";
	}

	public static String getFeedbackListUrl() {

		return URL_API_HOST_HTTP + "other/getAdviceList";
	}

	/*
	 * 金币商场
	 */
	public static String getMarketBindUrl() {
		return URL_API_HOST_HTTP + "hst/user/hstBind";
	}

	/*
	 * 商场
	 */
	public static String getMarketReBindUrl() {
		return URL_API_HOST_HTTP + "hst/user/hstRebind";
	}

	/*
	 * 积分规则url
	 */
	public static String getJifenRuleUrl() {
		return "http://dl.eyzhs.com/creditsRule/index.html";
	}

	/*
	 * 粉丝 关注列表 url
	 */
	public static String getMyFensiAndGuanZhuUrl() {
		return URL_API_HOST_HTTP + "user/getRelationUserList";
	}

	/*
	 * 关注,粉丝界面
	 */
	public static String getUserFollowFansUrl() {
		return URL_API_HOST_HTTP + "user/getUserHomePage";
	}

	/*
	 * 关注
	 */
	public static String getUserFollowUrl() {
		return URL_API_HOST_HTTP + "user/followUser";
	}

	/*
	 * 取消关注
	 */
	public static String getUserFollowCancelUrl() {
		return URL_API_HOST_HTTP + "user/cancelFollowUser";
	}

	/*
	 * 积分明细
	 */
	public static String getScoreInfoUrl() {
		return URL_API_HOST_HTTP + "user/getCreditsHistory";
	}

	/*
	 * 获取邀请码分享url
	 */
	public static String getYaoQingShareUrl(String userID) {
		return URL_API_HOST_DETAIL_HTTP + "invitation/" + userID;
	}

	public static String getVideoShareUrl(String vid) {
		return String
				.format("http://dl.eyzhs.com/videoShare/html/%s.html", vid);
	}

	/*
	 * 健康商场
	 */
	public static String getHealthMarketBindUrl() {
		return URL_API_HOST_HTTP + "hst/getHSTParam";
	}

	/*
	 * 启动日志接口
	 */
	public static String getUserBehaviorLogUrl() {
		return URL_API_HOST_HTTP + "system/userBehaviorLog";
	}

	/*
	 * 邀请朋友分享
	 */
	public static String getYaoQingFriendShareUrl() {
		return "http://dl.eyzhs.com/shareInvitation/index.html?QQ=1&Weixin=1";
	}

	/*
	 * 注册web 引导
	 */
	public static String getRegisterWebGuideUrl() {
		return "http://dl.eyzhs.com/promoteReg/index.html";
	}

	/*
	 * 获取视频详情
	 */
	public static String getVideoDetailUrl(String ArticleID, String UserID) {
		String format = String.format(
				"article/videoPicksDetail?ArticleID=%s&UserID=%s", ArticleID,
				UserID);

		return URL_API_HOST_DETAIL_HTTP + format;
	}

	/*
	 * bmi
	 */
	public static String getBmiUrl() {
		return URL_API_HOST_HTTP + "user/saveUserBMI";
	}

	public static String getIndexYzcUrl() {
		return "http://dl.eyzhs.com/kexueyunyu/yuezican/list.html";
	}

	public static String getIndexYqspUrl() {
		return "http://dl.eyzhs.com/kexueyunyu/yuezican/list.html";
	}

	/*
	 * 获取文章详情
	 *
	 * articleDetail
	 */
	public static String getShareMyArticleInfoUrl(Context context,
												  String articleID) {
		StringBuffer sb = new StringBuffer();
		sb.append(URL_API_HOST_DETAIL_HTTP);
		sb.append("articleDetail");

		String umengChannel = UtilityBase.getAppMetedata(context,
				"UMENG_CHANNEL");

		HashMap<String, String> maps = new HashMap<String, String>();
		maps.put("ArticleID", articleID);
		maps.put("UserID", LoginUtil.getUserId());
		maps.put("DeviceID", String.valueOf(Setting.DEVICEID));
		maps.put("DeviceSN", AppManager.getDeviceUniqueId(context));
		maps.put("ClientOSVersion", AppManager.getDeviceSdkVersion(context));
		maps.put("DeviceModel", AppManager.getDeviceModel(context));
		maps.put("ClientVersion", AppManager.getAppVersionName(context));
		maps.put("AppChannel", umengChannel);
		// 微信 朋友圈，一传ip地址，访问不了。奇怪，暂时不传ip地址
		// maps.put("ClientIP", AppManager.getDeviceIpAddress(context));

		String url = UtilityBase.connectParamsUrl(sb.toString(), maps);
		LogUtilBase.LogD(null, String.format("articleDetail url==>>%s", url));
		return url;
	}

	/*
	 * 获取文章详情
	 * 宝宝宫内成长日记 文章
	 *
	 * articleDetail
	 */
	public static String getBaoBaoGrowUrl(Context context) {
		StringBuffer sb = new StringBuffer();
		sb.append("http://dl.eyzhs.com/kexueyunyu/baobaogongnei/list.html");

		String umengChannel = UtilityBase.getAppMetedata(context,
				"UMENG_CHANNEL");
		HashMap<String, String> maps = new HashMap<String, String>();
		maps.put("UserID", LoginUtil.getUserId());
		maps.put("DeviceID", String.valueOf(Setting.DEVICEID));
		maps.put("DeviceSN", AppManager.getDeviceUniqueId(context));
		maps.put("ClientOSVersion", AppManager.getDeviceSdkVersion(context));
		maps.put("DeviceModel", AppManager.getDeviceModel(context));
		maps.put("ClientVersion", AppManager.getAppVersionName(context));
		maps.put("AppChannel", umengChannel);
		// 微信 朋友圈，一传ip地址，访问不了。奇怪，暂时不传ip地址
		// maps.put("ClientIP", AppManager.getDeviceIpAddress(context));

		String url = UtilityBase.connectParamsUrl(sb.toString(), maps);
		LogUtilBase.LogD(null, String.format("articleDetail url==>>%s", url));
		return url;
	}

	/*
	 * 孕期食谱 文章详情
	 *
	 * articleDetail
	 */
	public static String getToolYqspMyArticleInfoUrl(Context context,
												  String articleID) {
		StringBuffer sb = new StringBuffer();
		sb.append(URL_API_HOST_DETAIL_HTTP);
		sb.append("pregnancyRecipeList");

		String umengChannel = UtilityBase.getAppMetedata(context,
				"UMENG_CHANNEL");

		HashMap<String, String> maps = new HashMap<String, String>();
		maps.put("ArticleID", articleID);
		maps.put("UserID", LoginUtil.getUserId());
		maps.put("DeviceID", String.valueOf(Setting.DEVICEID));
		maps.put("DeviceSN", AppManager.getDeviceUniqueId(context));
		maps.put("ClientOSVersion", AppManager.getDeviceSdkVersion(context));
		maps.put("DeviceModel", AppManager.getDeviceModel(context));
		maps.put("ClientVersion", AppManager.getAppVersionName(context));
		maps.put("AppChannel", umengChannel);
		// 微信 朋友圈，一传ip地址，访问不了。奇怪，暂时不传ip地址
		// maps.put("ClientIP", AppManager.getDeviceIpAddress(context));

		String url = UtilityBase.connectParamsUrl(sb.toString(), maps);
		LogUtilBase.LogD(null, String.format("articleDetail url==>>%s", url));
		return url;
	}

	/*
	 * 每日关注 更多
	 */
	public static String getIndexDayArticleMoreUrl() {
		return URL_API_HOST_HTTP + "article/getArticleListByPeriod";
	}

	/*
	 * 检索热门文章关键词
	 */
	public static String getHotKeywordsUrl() {
		return URL_API_HOST_HTTP + "article/getHotKeywords";
	}

	/*
	 * 检索热门文章
	 */
	public static String getSearchArticleListUrl() {
		return URL_API_HOST_HTTP + "article/searchArticleList";
	}

	/*
	 * 宝宝喂养记录列表
	 */
	public static String getBabyFeedingRecordListUrl() {
		return URL_API_HOST_HTTP + "user/getBabyFeedingRecordList";
	}

	/*
	 * 宝宝奶粉列表
	 */
	public static String getMilkPowderBrandListUrl() {
		return URL_API_HOST_HTTP + "other/getMilkPowderBrandList";
	}

	/*
	 * 提交宝宝喂养记录
	 */
	public static String getSaveBabyFeedingRecordUrl() {
		return URL_API_HOST_HTTP + "user/saveBabyFeedingRecord";
	}

	/*
	 * 提交月经
	 */
	public static String getSaveUserMenstruationUrl() {
		return URL_API_HOST_HTTP + "user/saveUserMenstruation";
	}

	/*
	 * 获取月经详情
	 */
	public static String getUserMenstruation() {
		return URL_API_HOST_HTTP + "user/getUserMenstruation";
	}

	/*
	 * 作家专栏
	 */
	public static String getWriterListUrl() {
		return URL_API_HOST_HTTP + "article/getArticleListByAuthorID";
	}

	/*
	 * 作家专栏赞
	 */
	public static String getWriterFavorUrl() {
		return URL_API_HOST_HTTP + "article/favourArticle";
	}

	/*
	 * 作家专栏
	 */
	public static String getWriterCommentListUrl() {
		return URL_API_HOST_HTTP + "article/getArticelCommentList";
	}

	/*
	 * 作家专栏评论赞
	 */
	public static String getWriterCommetnFavorUrl() {
		return URL_API_HOST_HTTP + "article/favourArticleComment";
	}

	/*
	 * 作家专栏回复
	 */
	public static String getWriterCommetnReplyUrl() {
		return URL_API_HOST_HTTP + "article/commentArticle";
	}

	/*
	 * 消息数量
	 */
	public static String getMassegeCountUrl() {
		return URL_API_HOST_HTTP + "user/getNewMessageCount";
	}

	/*
	 * 消息数据
	 */
	public static String getMassegeDataUrl() {
		return URL_API_HOST_HTTP + "user/getNewMessageList";
	}
	
	/*
	 * 系统消息数据
	 */
	public static String getSystemDataUrl() {
		return URL_API_HOST_HTTP + "user/getPublicSystemMessageList";
	}

	/*
	 * 帖子评论赞
	 */
	public static String getBbsFavorUrl() {
		return URL_API_HOST_HTTP + "bbs/FavourTopicReply";
	}

	/*
	 * 疫苗时间表上传
	 */
	public static String getUploadYiMiaoUrl() {
		return URL_API_HOST_HTTP + "user/saveToolUserInfo";
	}

	/*
	 * 疫苗时间表下载
	 */
	public static String getdownloadYiMiaoUrl() {
		return URL_API_HOST_HTTP + "user/getToolUserInfo";
	}
	
	/*
	 * 生长曲线上传
	 */
	public static String getGrowSaveUrl() {
		return URL_API_HOST_HTTP + "user/saveBabyGrowingRecord";
	}

	public static String getGrowArticleListUrl()
	{
		return "http://dl.eyzhs.com/kexueyunyu/3yearbaby/list.html";
	}

	public static String getBabyXingGeUrl()
	{
		return "http://dl.eyzhs.com/static/babyBloodType.html";
	}

	public static String getYcqzcUrl() {
		return URL_API_HOST_HTTP + "user/saveUserEDC";
	}
	
	/*
	 * 产检时间表上传
	 */
	public static String getUploadChanjianUrl() {
		return URL_API_HOST_HTTP + "user/saveUserPregnantCheck";
	}
	/*
	 * 产检时间表修改
	 */
	public static String getUpdateChanjianUrl() {
		return URL_API_HOST_HTTP + "user/updateUserPregnantCheck";
	}
	/*
	 * 产检时间表获取data
	 */
	public static String getDataChanjianUrl() {
		return URL_API_HOST_HTTP + "user/getUserPregnantCheckList";
	}
	/*
	 * 产检时间表删除
	 */
	public static String getDeleteChanjianUrl() {
		return URL_API_HOST_HTTP + "user/deleteUserPregnantCheck";
	}

	/*
	 * 获取广告列表
	 */
	public static String getAdvertisementListUrl() {
		return URL_API_HOST_HTTP + "advertise/getAdvertisementList";
	}
	
	public static String getHospitalAdviceListUrl() {
		return URL_API_HOST_HTTP + "consult/getConsultQuestionList2";
	}
	
	public static String getHospitalNewCountUrl() {
		return URL_API_HOST_HTTP + "consult/getNewCount";
	}
	
}
